<?php
/**
 * 用户资产清理任务-分析结果
 */
date_default_timezone_set('PRC');
$dir = dirname(__FILE__);
//全局配置文件目录
define('APP_ROOT', realpath($dir . '/../../'));
require_once(APP_ROOT . '/../bfw/Main.php');
require_once(APP_ROOT . "/application/config/config.inc.php");
Main::setConfig($appConfig);
Main::init();

ini_set("memory_limit", "1024m");

$clearTaskModule = new ClearTaskModule();
$where = array(
    'status' => 0,
);
$taskList = $clearTaskModule->getClearTaskList($where,'*','id asc',0,1);

foreach ($taskList as $task){
    if ($task['status'] == 0){//分析
        $clearTaskModule->saveClearTask($task['id'],array('status'=>1));
        ClearTaskService::runTaskAnalyse($task);
    }
    echo "任务分析完成:{$task['id']}".PHP_EOL;
}

exit;













